
:root {
    --primary: #1A4D7C;
    --primary-dark: #12395D;
    --primary-light: #EAF1F8;
    --background: #F5F7FA;
    --white: #FFFFFF;
    --text: #231815;
    --muted: #777777;
    --border: #E5E9EF;
    --danger: #D9534F;
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Nunito', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    background: var(--background);
    color: var(--text);
}

a {
    text-decoration: none;
    color: inherit;
}

button,
input,
select {
    font: inherit;
}

.page-wrapper {
    display: flex;
    min-height: 100vh;
}

/* SIDEBAR */

.sidebar {
    width: 260px;
    min-width: 260px;
    background: var(--white);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    padding: 25px 17px;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 100;
    overflow-y: auto;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 8px;
    margin-bottom: 32px;
}

.logo-container img {
    width: 42px;
    height: 42px;
    object-fit: contain;
}

.logo-container span {
    font-family: var(--font-heading);
    font-size: 15px;
    font-weight: 800;
    color: var(--primary);
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--primary-light);
    border-radius: 12px;
    padding: 13px 11px;
    margin-bottom: 28px;
    min-width: 0;
}

.user-avatar,
.top-avatar {
    width: 42px;
    height: 42px;
    min-width: 42px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    background: var(--primary);
    color: var(--white);
    font-weight: 800;
    font-size: 16px;
}

.user-details {
    min-width: 0;
}

.user-details h3 {
    font-size: 13px;
    font-weight: 800;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-details p {
    color: var(--muted);
    font-size: 11px;
    margin-top: 2px;
}

.nav-label {
    font-family: var(--font-heading);
    color: #9AA2AC;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.2px;
    padding: 0 12px;
    margin-bottom: 10px;
}

.account-label {
    margin-top: 28px;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 12px 14px;
    border-radius: 9px;
    color: #646E79;
    font-size: 13px;
    font-weight: 700;
    transition: 0.2s ease;
}

.nav-link i {
    width: 18px;
    text-align: center;
    font-size: 15px;
}

.nav-link:hover,
.nav-link.active {
    background: var(--primary-light);
    color: var(--primary);
}

.sidebar-bottom {
    margin-top: auto;
    padding-top: 25px;
}

.logout-button {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 12px 14px;
    border: none;
    background: transparent;
    color: var(--danger);
    border-radius: 9px;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    text-align: left;
}

.logout-button:hover {
    background: #FFF0EF;
}

/* MAIN CONTENT */

.main-content {
    margin-left: 260px;
    width: calc(100% - 260px);
    min-height: 100vh;
}

.topbar {
    height: 82px;
    background: var(--white);
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 38px;
    position: sticky;
    top: 0;
    z-index: 50;
}

.topbar-left,
.topbar-right {
    display: flex;
    align-items: center;
}

.topbar-left {
    gap: 15px;
}

.topbar-subtitle {
    color: var(--muted);
    font-size: 11px;
    margin-bottom: 3px;
}

.topbar h2 {
    font-family: var(--font-heading);
    font-size: 18px;
    color: var(--text);
}

.topbar-right {
    gap: 22px;
}

.topbar-icon {
    color: #65717D;
    font-size: 18px;
}

.topbar-icon:hover {
    color: var(--primary);
}

.topbar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    font-weight: 800;
}

.top-avatar {
    width: 37px;
    height: 37px;
    min-width: 37px;
    font-size: 14px;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--primary);
    font-size: 20px;
    cursor: pointer;
}

/* PAGE CONTENT */

.content-container {
    width: 100%;
    max-width: 1150px;
    margin: 0 auto;
    padding: 35px 38px;
}

.page-heading {
    margin-bottom: 25px;
}

.welcome-text {
    color: var(--primary);
    font-size: 10px;
    font-family: var(--font-heading);
    font-weight: 800;
    letter-spacing: 1.5px;
    margin-bottom: 8px;
}

.page-heading h1 {
    font-family: var(--font-heading);
    font-size: 27px;
    font-weight: 800;
    margin-bottom: 8px;
}

.page-description {
    color: var(--muted);
    font-size: 13px;
}

/* PROFILE HEADER */

.profile-header-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
    margin-bottom: 22px;
    box-shadow: 0 3px 12px rgba(26, 77, 124, 0.035);
}

.profile-cover {
    height: 125px;
    background: linear-gradient(115deg, #1A4D7C, #477BAA);
    position: relative;
    overflow: hidden;
}

.profile-cover::before,
.profile-cover::after {
    content: "";
    position: absolute;
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 50%;
}

.profile-cover::before {
    width: 260px;
    height: 260px;
    right: 12%;
    top: -170px;
}

.profile-cover::after {
    width: 190px;
    height: 190px;
    right: 5%;
    top: -100px;
}

.profile-header-content {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 0 28px 25px;
}

.profile-picture-container {
    position: relative;
    width: 105px;
    height: 105px;
    min-width: 105px;
    margin-top: -48px;
}

.profile-picture {
    width: 105px;
    height: 105px;
    border: 5px solid var(--white);
    border-radius: 50%;
    background: var(--primary-light);
    color: var(--primary);
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: var(--font-heading);
    font-size: 28px;
    font-weight: 800;
    overflow: hidden;
}

.profile-picture img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.upload-picture-button {
    position: absolute;
    right: 0;
    bottom: 3px;
    width: 31px;
    height: 31px;
    border: 3px solid var(--white);
    border-radius: 50%;
    background: var(--primary);
    color: var(--white);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 12px;
    cursor: pointer;
    transition: 0.2s ease;
}

.upload-picture-button:hover {
    background: var(--primary-dark);
    transform: scale(1.06);
}

.profile-header-details {
    padding-top: 13px;
    min-width: 0;
}

.profile-header-details h2 {
    font-family: var(--font-heading);
    font-size: 19px;
    font-weight: 800;
    margin-bottom: 5px;
    overflow-wrap: anywhere;
}

.profile-header-details p {
    color: var(--muted);
    font-size: 12px;
    margin-bottom: 9px;
}

.student-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--primary);
    background: var(--primary-light);
    padding: 5px 9px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 800;
}

/* PROFILE CARDS */

.profile-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 25px;
    margin-bottom: 22px;
    box-shadow: 0 3px 12px rgba(26, 77, 124, 0.035);
}

.card-heading {
    display: flex;
    align-items: center;
    gap: 13px;
    padding-bottom: 21px;
    margin-bottom: 22px;
    border-bottom: 1px solid var(--border);
}

.heading-icon {
    width: 43px;
    height: 43px;
    min-width: 43px;
    border-radius: 11px;
    background: var(--primary-light);
    color: var(--primary);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 17px;
}

.card-heading h2 {
    font-family: var(--font-heading);
    font-size: 15px;
    font-weight: 800;
    margin-bottom: 5px;
}

.card-heading p {
    color: var(--muted);
    font-size: 12px;
}

/* PROFILE FORM */

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 21px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 12px;
    font-weight: 800;
    color: #424B55;
}

.input-container {
    position: relative;
    display: flex;
    align-items: center;
}

.input-container > i {
    position: absolute;
    left: 13px;
    color: #8995A1;
    font-size: 13px;
    pointer-events: none;
}

.input-container input,
.input-container select {
    width: 100%;
    height: 45px;
    border: 1px solid #DCE2E9;
    border-radius: 8px;
    padding: 0 13px 0 38px;
    outline: none;
    color: var(--text);
    background: var(--white);
    font-size: 13px;
    transition: 0.2s ease;
}

.input-container input::placeholder {
    color: #A3ABB4;
}

.input-container input:focus,
.input-container select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(26, 77, 124, 0.10);
}

.input-container select {
    cursor: pointer;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 27px;
}

.button {
    border: none;
    border-radius: 8px;
    padding: 11px 17px;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: 0.2s ease;
}

.button-primary {
    background: var(--primary);
    color: var(--white);
}

.button-primary:hover {
    background: var(--primary-dark);
}

.button-secondary {
    background: #F0F2F5;
    color: #59636E;
}

.button-secondary:hover {
    background: #E4E8ED;
}

/* ACCOUNT OVERVIEW */

.overview-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 15px;
}

.overview-item {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 10px;
    min-width: 0;
}

.overview-icon {
    width: 40px;
    height: 40px;
    min-width: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: 9px;
    font-size: 15px;
}

.overview-item p {
    font-size: 11px;
    color: var(--muted);
    margin-bottom: 5px;
}

.overview-item h3 {
    font-size: 13px;
    font-weight: 800;
    overflow-wrap: anywhere;
}

/* FOOTER */

.footer {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    color: #929AA3;
    font-size: 11px;
    padding: 12px 2px 5px;
}

/* MOBILE SIDEBAR */

.sidebar-overlay {
    display: none;
}

@media (max-width: 950px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
        width: 100%;
    }

    .menu-toggle {
        display: block;
    }

    .sidebar-overlay.show {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.35);
        z-index: 90;
    }
}

@media (max-width: 650px) {
    .topbar {
        height: 70px;
        padding: 0 17px;
    }

    .topbar h2 {
        font-size: 16px;
    }

    .topbar-subtitle {
        font-size: 10px;
    }

    .topbar-right {
        gap: 13px;
    }

    .topbar-user span {
        display: none;
    }

    .content-container {
        padding: 25px 16px;
    }

    .page-heading h1 {
        font-size: 23px;
    }

    .profile-header-content {
        padding: 0 17px 20px;
        gap: 13px;
    }

    .profile-picture-container {
        width: 85px;
        height: 85px;
        min-width: 85px;
        margin-top: -38px;
    }

    .profile-picture {
        width: 85px;
        height: 85px;
        font-size: 23px;
    }

    .profile-header-details h2 {
        font-size: 16px;
    }

    .profile-card {
        padding: 19px 16px;
    }

    .form-grid,
    .overview-grid {
        grid-template-columns: 1fr;
        gap: 17px;
    }

    .form-actions {
        flex-wrap: wrap;
    }

    .form-actions .button {
        flex: 1;
    }

    .footer {
        flex-direction: column;
        text-align: center;
        gap: 5px;
        padding-top: 15px;
    }
}

@media (max-width: 380px) {
    .profile-header-content {
        align-items: flex-start;
    }

    .profile-header-details {
        padding-top: 8px;
    }

    .card-heading h2 {
        font-size: 13px;
    }

    .card-heading p {
        font-size: 11px;
    }
}
